<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  <!--事件绑定-->
  <button v-on:click="f1()">按钮1</button>
  <button @click="f1()">按钮2</button>
</div>
<script src="https://cdn.staticfile.org/vue/3.3.4/vue.global.min.js"></script>
<script>
    let app = Vue.createApp({
        data() {
            return {
                info: "事件绑定",
            }
        },
        methods: {
            f1() {
                alert("f1");
            }
        }
    })
    app.mount('body>div');
</script>
</body>
</html>